package com.viu.technology.po;

import com.viu.technology.util.JsonUtil;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

public class Order {
    private Integer orderId;

    private String orderNo;

    @NotBlank(message = "商品ID不能为空")
    private String productId;

    private Integer orderStatus;

    @NotNull(message = "请输入正确的商品数量")
    private Integer productCount;

    private Integer productAmountTotal;

    private Integer orderAmountTotal;

    @NotNull(message = "请输入正确的地址ID")
    private Integer addressId;

    private Date createDate;

    private Date payDate;

    private Date shipmentDate;

    private String userId;

    private String userRemark;

    public Order(Integer orderId, String orderNo, String productId, Integer orderStatus, Integer productCount, Integer productAmountTotal, Integer orderAmountTotal, Integer addressId, Date createDate, Date payDate, Date shipmentDate, String userId, String userRemark) {
        this.orderId = orderId;
        this.orderNo = orderNo;
        this.productId = productId;
        this.orderStatus = orderStatus;
        this.productCount = productCount;
        this.productAmountTotal = productAmountTotal;
        this.orderAmountTotal = orderAmountTotal;
        this.addressId = addressId;
        this.createDate = createDate;
        this.payDate = payDate;
        this.shipmentDate = shipmentDate;
        this.userId = userId;
        this.userRemark = userRemark;
    }

    public Order() {
        super();
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Integer getProductCount() {
        return productCount;
    }

    public void setProductCount(Integer productCount) {
        this.productCount = productCount;
    }

    public Integer getProductAmountTotal() {
        return productAmountTotal;
    }

    public void setProductAmountTotal(Integer productAmountTotal) {
        this.productAmountTotal = productAmountTotal;
    }

    public Integer getOrderAmountTotal() {
        return orderAmountTotal;
    }

    public void setOrderAmountTotal(Integer orderAmountTotal) {
        this.orderAmountTotal = orderAmountTotal;
    }

    public Integer getAddressId() {
        return addressId;
    }

    public void setAddressId(Integer addressId) {
        this.addressId = addressId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getPayDate() {
        return payDate;
    }

    public void setPayDate(Date payDate) {
        this.payDate = payDate;
    }

    public Date getShipmentDate() {
        return shipmentDate;
    }

    public void setShipmentDate(Date shipmentDate) {
        this.shipmentDate = shipmentDate;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserRemark() {
        return userRemark;
    }

    public void setUserRemark(String userRemark) {
        this.userRemark = userRemark;
    }

    @Override
    public String toString() {
        JsonUtil jsonUtil = new JsonUtil();
        return jsonUtil.objectToJsonObject(this).toString();
    }
}